<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
    <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" /> 
	<meta name="format-detection" content="telephone=no">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<script type="text/javascript" src="/Public/js/jquery-1.7.2.min.js"></script>
    <link rel="stylesheet" type="text/css" href="/Public/Admin/css/index.css">
	<meta charset="UTF-8">
	<title>密码修改</title>
</head>
<body>
    <div class="password_up">密码修改</div>
    <br/><br/>
	<div class="uppassword"><div class="password_font">新密码:</div><div class="password_input password_input_newpassword"><input type="text" /></div></div>
	<br/><br/>
	<div class="uppassword"><div class="password_font">确认新密码:</div><div class="password_input password_input_surepassword"><input type="text" /></div></div>
    <br/><br/>
    <div class="submit">提交</div>

    <script type="text/javascript">
    	$('.submit').click(function(){
    		var password=$('.password_input_newpassword input').val();
    		var surepassword=$('.password_input_surepassword input').val();
    		if(password!=surepassword){
              alert('确认密码错误！');
              return;
    		}
    		$.post("<?php echo U('Index/up_password');?>",{password:password},function(data){
               if(data==100){
               alert('修改成功');
               location.href="<?php echo U('Index/index');?>"
               }else if(data==101){
               	alert('密码不能与原始密码相同');
               }else{
               	alert('密码修改失败');
               }
    		})
    	})
    </script>
</body>
</html>